﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CCalc__
{
    /*
     * Maintainer: Alex Kollar (codemonkeyalx@gmail.com)
	 * 
	 * Program Description: The program will simply allow the user to use a
	 * basic four operation calculator.
	 * 
	 * Program Functions: - Present the user with a menu of options (Addition,
	 * Subtraction, Multiplication, and Division) - Allow the user to pick what
	 * they want to do. (Achieved by using numbers with corresponding sections
	 * of the program) - Allows the user to do simple two number math problems.
	 * (The user is asked to give two numbers to do math with) - The program
	 * displays a detailed solution. - The program then offers the options to do
	 * more math or to exit
	 * 
	 * Testing: A simple test run should suffice.
	 * 
	 * Status: Successful (As of: 4/2/13)
     */

   public class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("{|+|====|+|}[CCalc++ Ver: 0.1 -- Main Menu]{|+|====|+|}\n\n1.) Addition \n2.) Subtraction \n3.) Multiplication \n4.) Division"+
                "\n5.) Times Tables \n6.) Square Roots\n7.) Area of a Sphere\n9.) Exit Calculator\n\n9001.) Easter Eggs Menu \n"); //Sets up the main menu for the user to pick from
            Console.Write("Please enter a number: "); // Asks for user imput
            string menuOption = Console.ReadLine(); //Gathers user input
            double mOnum; //Creates a variable for input storage to a double
            double.TryParse(menuOption, out mOnum); //Converts a string to the mentiond double
            mathOps mathO = new mathOps();            
            if (mOnum == 1)
            {
                //Run MathOps Addition Module
                mathO.Addition();                
            }
            if (mOnum == 2)
            {
                //Run MathOps subtraction Module
                mathO.Subtraction();
            }
            if (mOnum == 3)
            {
                //Run MathOps Multiplication Module
                mathO.Multiplication();
            }
            if (mOnum == 4)
            {
                //Run MathOps Division Module
                mathO.Division();
            }
            if (mOnum == 5)
            {
                mathO.TimesTable();
            }
            if (mOnum == 6)
            {
                //Run MathOps Square Roots Module
                mathO.SquareRoot();
            }
            if (mOnum == 7)
            {
                //Run MathOps Spherical AV Module
                mathO.SphericalAV();
            }
            //Easter Egg Area's
            if (mOnum == 9001)
            {
                Cadbury bunny = new Cadbury();
                bunny.EasterMenu();

            }
            if (mOnum == 9)
            {
                Console.WriteLine("\nExiting Calculator.... Thanks for using!");
                System.Threading.Thread.Sleep(500);
            }
        }
        public void menuMain()
        {
            Main(null);
        }
    }
}
